package com.xh.service.imp;

import com.xh.dao.BlogMapper;
import com.xh.service.BlogService;
import com.xh.vo.Blog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BlogServiceImp implements BlogService {
    @Resource
    private BlogMapper blogMapper;

    @Override
    public void NewBlog(Blog blog) {
        blogMapper.NewBlog(blog);
    }

    @Override
    public List<Blog> getBlogList() {
        return blogMapper.getBlogList();
    }

    @Override
    public List<Blog> getBlogListBySort(String sort) {
        return blogMapper.getBlogListBySort(sort);
    }

    @Override
    public Blog getBlogListById(Integer bId) {
        return blogMapper.getBlogListById(bId);
    }

    @Override
    public void newParis(Integer bid) {
        blogMapper.newParis(bid);
    }

    @Override
    public void deleteParis(Integer bid) {
        blogMapper.deleteParis(bid);
    }

    @Override
    public List<Blog> getBlogListByUserId(Integer userId) {
        return blogMapper.getBlogListByUserId(userId);
    }

    @Override
    public void deleteBlog(Integer bId) {
        blogMapper.deleteBlog(bId);
    }

    @Override
    public List<String> queryCountBlog() {
        return blogMapper.queryCountBlog();
    }

    @Override
    public List<String> queryQueryCountBlogUserName() {
        return blogMapper.queryQueryCountBlogUserName();
    }

}
